// 彩色按钮 mixin
.btn-color(@color) {
  display: inline-block;
  line-height: 1.2;
  padding: 8px 16px;
  font-size: 14px;
  -webkit-border-radius: 3px;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 3px;
  -moz-background-clip: padding;
  border-radius: 3px;
  background-clip: padding-box;
  white-space: nowrap;
  -webkit-transition: background-color 0.2s;
  -moz-transition: background-color 0.2s;
  -o-transition: background-color 0.2s;
  transition: background-color 0.2s;
  background-color: @color;
  border: 1px solid @color;
  color: #fff;

  &.btn-hollow {
    background-color: transparent;
    color: @color;

    &:hover {
      background-color: @color;
      color: #fff;
    }
  }

  &.btn-xs {
    padding: 3px 8px;
    font-size: 12px;
  }

  &:hover {
    color: #fff;
    background-color: @color;
    border-color: @color;
  }
}

.btn-yellow {
  .btn-color(#E4B931);
}

.btn-blue {
  .btn-color(#32ADFA);
}

.btn-red {
  .btn-color(#e5603b);
}

.btn-gray {
  .btn-color(#999999);
}

.btn-green {
  .btn-color(#47b268);
}

.widget-normal {
  .widget-title {
    .float-right {
      .iconfont {
        color: #aaaaaa;

        &:hover {
          color: #fff;
        }

        .icon {
          font-weight: normal;
        }

        .text {
          font-family: Open Sans,Hiragino Sans GB,Microsoft Yahei,sans-serif;
          margin-left: 3px;
          font-weight: normal;
        }
      }
    }
  }

  .search-row {
    margin-bottom: 20px;

    .search-box {
      width: 303px;
      display: inline-block;
    }
  }

  .button-row {
    margin-bottom: 15px;

    .btn-bold {
      margin-right: 6px;
      font-weight: 700;
    }
  }

  .btn-bold {
    font-weight: 700;
  }
}

.table-reduced {
  background-color: transparent !important;

  tr {
    margin: 5px auto;
  }

  td {
    padding: 0px;
    text-align: left;
    background-color: transparent !important;
    border: none !important;
  }
}

.dialog-content {
  .mlr6 {
    margin: auto 6px;
  }

  .ml6 {
    margin-left: 6px;
  }

  .mr6 {
    margin-right: 6px;
  }

  .input-text-80 {
    display: inline-block;
    width: 80px !important;
    float: none !important;
    .mlr6;
  }

  .mp-box {
    padding: 0px 10px;
    margin: 10px auto;
  }

  .r4 {
    border-radius: 4px;
  }

  .color-hover-darken-20(@color) {
    color: @color;
    &:hover {
      color: darken(@color, 20%);
    }
  }

  i.iconfont {
    font-size: 14px;
    .color-hover-darken-20(#D1D1D1);
  }

  @form-label-width: 6em;

  .form-group {
    padding: 10px;

    &.horizontal {
      li {
        position: relative;
        padding-left: @form-label-width;

        &:last-child {
          margin-bottom: 0px;
        }

        .control-label {
          position: absolute;
          left: 0;
          top: 0;
          width: @form-label-width;
          text-align: left;
          -webkit-box-sizing: border-box;
          -moz-box-sizing: border-box;
          box-sizing: border-box;
        }

        .input-text {
          float: left;
          width: 80%;
        }
      } // li

      .button-row .mr6:last-child {
        margin-right: 0px;
      }
    }
  } // form-group

  @dialog-component-background-color: #f5f5f5;

  .item-add {
    width: 562px;
    height: 224px;
    line-height: 224px;
    background-color: @dialog-component-background-color;

    i.iconfont {
      font-size: 20px;
      .color-hover-darken-20(#9e9e9e);
    }
  } // tab-add

  .items {
    padding: 10px;
    margin-right: 10px;
    position: relative;
    background-color: @dialog-component-background-color;

    .type-container {
      height: 33px;

      .type-condition {
        display: inline-block;
        width: 150px;
      }
    }

    .selector-operator {
      display: inline-block;
      width: 110px;
      position: absolute;
      left: 251px;
      top: 120px;
    }

    .condition-container {
      margin: 10px auto;

      .input-value {
        display: inline-block;
        width: 80px;
      }

     & > .auto-row {
       height: 34px;
     }
    }

    .auto-row {
      position: relative;
      display: block;
      margin: 10px auto;

      .left {
        float: left;
        width: @form-label-width;
        text-align: left;
        line-height: 34px;
      }

      .main {
        display: block;
        margin-left: @form-label-width;
        line-height: 34px;

        .infill {
          display: inline-block;
          width: 120px;
        }
      }
    }
  }

  .widget-title .float-right .iconfont:hover {
    color: darken(#9F9F9F, 20%);;
  }
}

.input-addon {
  padding: 6px 12px;
  font-size: 14px;
  height: 34px;
  box-sizing: border-box;
  float: left;
}
.text-red {
  color: #d1431c;
}

.operation .iconfont {
  margin-left: 0px;
}
